package jvm;

public class Test05 {
    public Test05() {
        System.out.println("Test05 的构造方法执行了");
    }
    {
        System.out.println("Test05 构造代码块执行了");
    }
    static {
        System.out.println("Test05 静态代码块执行了");
    }
    public static void main(String[] args) {
        System.out.println("-------------main------执行了");
        new CodeBlock();
        System.out.println("--------------------");
        new CodeBlock();
        System.out.println("-------------------------------");
        new Test05();
        System.out.println("-------------");
    }
}
class CodeBlock {
    public CodeBlock() {
        System.out.println("CodeBlock 构造方法执行了");
    }
    {
        System.out.println("CodeBlock 构造代码块执行了");
    }
    static {
        System.out.println("CodeBlock 静态代码块执行了");
    }
}